<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Calculadora Simples</title>
    </h:head>
    <h:body>
        <h:messages id="messages"/>
        <h:form id="calcForm">
            <h:panelGrid columns="2">
                <h:outputLabel id="label1" for="numero1" value="Numero 1:"/>
                <h:inputText id="numero1" value="#{CalcBean.n1}"/>
                <h:outputLabel id="label2" for="numero2" value="Numero 2:"/>
                <h:inputText id="numero2" value="#{CalcBean.n2}"/>
                <h:outputLabel id="labelResult" for="numeroResult" value="Resultado:"/>
                <h:inputText id="numeroResult" value="#{CalcBean.result}"/>
            </h:panelGrid>
            <h:panelGrid columns="4">
                <h:commandButton value="Somar" action="#{CalcBean.somar}"/>
                <h:commandButton value="Subtrair" action="#{CalcBean.subtrair}"/>
                <h:commandButton value="Multiplicar" action="#{CalcBean.multiplicar}"/>
                <h:commandButton value="Dividir" action="#{CalcBean.dividir}"/>
            </h:panelGrid>
        </h:form>
    </h:body>
</html>

